# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo13
# Description:
# Author:       98745
# Date:         2019/3/9
#-------------------------------------------------------------------------------

import datetime
d1=datetime.datetime(2019,3,9)
d2=datetime.datetime(2020,3,9)
print((d2-d1).days)
d1=datetime.datetime(2019,3,9,10,10,10)
d2=datetime.datetime(2020,3,9,10,10,40)
print(d2-d1)
print((d2-d1).seconds)
d1=datetime.datetime.now()
d2=d1+datetime.timedelta(hours=10)
import time
d2=time.localtime(d2.timestamp())
print(time.strftime('%Y-%m-%d %H:%M:%S',d2))